package com.iwhalecloud.bss.kite.cucc.order.accept.constructor;

import com.iwhalecloud.bss.kite.order.client.dto.OrderRequest;

import java.util.Map;

/**
 * 数据构造器
 */
public interface IDataConstructor<T, I> {

    public static final String KEY_REL_TYPE = "relType";

    public static final String KEY_INST_REL_ID = "instRelId";

    public static final String KEY_PARENT_INST_TYPE = "parentInstType";

    public static final String KEY_PARENT_INST_ID = "parentInstId";

    /**
     * orderRequest是否已经包含该实例
     * @param OrderRequest
     * @param parentId
     * @param id
     * @param params
     * @return
     */
    boolean contains(OrderRequest orderRequest, String parentId, String id, Map<String, Object> params);

    /**
     * 构造实例对象
     * @param OrderRequest
     * @param instId
     * @param params
     */
    I build(OrderRequest orderRequest, T param, Map<String, Object> params);
}
